<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            height: 3000px;
        }
    </style>
</head>
<body>
    <script>
        document.addEventListener('click',function(e){
            console.log(e);
            // 鼠标的坐标 相对于可视区的上和左边界 
            console.log(e.clientX);
            console.log(e.clientY);

            //鼠标的坐标 相对于整个文档页面的上和左边界
            console.log(e.pageX);
            console.log(e.pageY);

            //鼠标的坐标 相对于电脑屏幕 不常用
            console.log(e.screenX);
            console.log(e.screenY);
        })
    </script>
</body>
</html>